﻿using ChineseSchool.BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ChineseSchool.Admin
{
    public partial class ucLastestActivities : System.Web.UI.UserControl
    {
        private B_Activities activitiesServices = new B_Activities();

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindGrid();
            }
        }

        private void BindGrid()
        {
            var lstLastestLesson = activitiesServices.GetLastestActivities();
            rptTopLesson.DataSource = lstLastestLesson;
            rptTopLesson.DataBind();
        }
    }
}